import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    {path: '/assess', component: () => import('../views/orders/assess.vue')},
    {path: '/logistics', component: () => import('../views/orders/logistics.vue')},
    {path: '/payment', component: () => import('../views/orders/payment.vue')},
    {path: '/returnGoods', component: () => import('../views/orders/returnGoods.vue')},
    {path: '/orders', component: () => import('../views/orders/orders')},
]

const router = new VueRouter({
    routes
})

const VueRouterPush = VueRouter.prototype.push

VueRouter.prototype.push = function push(to) {
    return VueRouterPush.call(this, to).catch(err => err)
}
export default router
